r = 1 gotpistol = 1 wolf = 1 SCREEN 12 COLOR 7, 0 CLS DIM SHARED DOOM AS DOUBLE Minutes = 10 Seconds = 0 GameTime = Minutes * 60 + Seconds DIM directions(1 TO 9) AS STRING directions(1) = "SOUTH OR EAST" directions(2) = "WEST, EAST, OR SOUTH" directions(3) = "WEST OR SOUTH" directions(4) = "NORTH, SOUTH, OR EAST" directions(5) = "NORTH, SOUTH, EAST, OR WEST" directions(6) = "NORTH, SOUTH, OR WEST" directions(7) = "NORTH OR EAST" directions(8) = "EAST, WEST, OR NORTH" directions(9) = "NORTH OR WEST" PRINT "" PRINT "" PRINT "WILD ATTACKS...have been happening through out the Pilgrim Park area. It's the" PRINT "middle of the night and the latest sighting, has placed the creature in this" PRINT "area. People have been turning up dead all over town...and they say it's here." PRINT "Somewhere, lurking in the darkness. You only have one shot to bring it down." PRINT "A silver bullet crafted by the hands of an old world man." PRINT "" DO: LOOP UNTIL INKEY$ <> "" DOOM = TIMER(0.001) + GameTime 'change this to to desied time for the game to run DO CLS PRINT PRINT PRINT " " PRINT " " PRINT " " PRINT " The Wolf in the Park " PRINT " " PRINT " Written by " PRINT " " PRINT " D.B. Taylor" PRINT "" PRINT " Copyright (c) 2015" PRINT "" PRINT SPACE$(38); IF INSTR(directions(r), "NORTH") THEN PRINT "N" ELSE PRINT PRINT "*---------------------------------* "; IF INSTR(directions(r), "WEST") THEN PRINT "W"; ELSE PRINT " "; PRINT " + "; IF INSTR(directions(r), "EAST") THEN PRINT "E"; ELSE PRINT " "; PRINT " *------------------------------------*" PRINT SPACE$(38); IF INSTR(directions(r), "SOUTH") THEN PRINT "S" ELSE PRINT PRINT PRINT "If you are stuck just type HELP." PRINT GOSUB ROOM GOSUB parser LOOP ROOM: IF r = 1 THEN: GOSUB r1 IF r = 2 THEN: GOSUB r2 IF r = 3 THEN: GOSUB r3 IF r = 4 THEN: GOSUB r4 IF r = 5 THEN: GOSUB r5 IF r = 6 THEN: GOSUB r6 IF r = 7 THEN: GOSUB r7 IF r = 8 THEN: GOSUB r8 IF r = 9 THEN: GOSUB r9 RETURN parser: PRINT "> "; cmd$ = GrabInput cmd$ = LTRIM$(RTRIM$(UCASE$(cmd$))) IF cmd$ = "END" OR cmd$ = "QUIT" OR cmd$ = "EXIT" OR cmd$ = "Q" THEN END END IF IF cmd$ = "HELP" OR cmd$ = "H" OR cmd$ = "?" THEN CLS PRINT "HERE ARE SOME BASIC COMMANDS THAT CAN BE USED IN THE GAME..." PRINT PRINT "NORTH, EAST ,SOUTH, AND WEST - MOVE TO AN AVAILABLE LOCATION" PRINT "EXAMINE (OBJECT) - EXAMINE AN OBJECT" PRINT "USE (OBJECT) - USE AN OBJECT" PRINT "TAKE (OBJECT) - TAKE OR MOVE AN OBJECT" PRINT "INVENTORY - VIEW YOUR INVENTORY" PRINT "DRINK - DRINK BEER" PRINT "UNLOCK - UNLOCK DOOR" PRINT "HELP - VIEW THIS SCREEN" PRINT "END - END GAME" PRINT PRINT "PRESS ANY KEY...": SLEEP DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF cmd$ = "INVENTORY" OR cmd$ = "INV" OR cmd$ = "ITEMS" OR cmd$ = "I" THEN CLS PRINT "INVENTORY..." PRINT IF gotpistol = 1 THEN: PRINT "An old service revolver from the Great War." PRINT PRINT "PRESS ANY KEY..." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF cmd$ = "GO NORTH" OR cmd$ = "NORTH" OR cmd$ = "N" THEN IF r = 7 THEN: r = 4: GOTO moved IF r = 4 THEN: r = 1: GOTO moved IF r = 8 THEN: r = 5: GOTO moved IF r = 5 THEN: r = 2: GOTO moved IF r = 9 THEN: r = 6: GOTO moved IF r = 6 THEN: r = 3: GOTO moved END IF IF cmd$ = "GO EAST" OR cmd$ = "EAST" OR cmd$ = "E" THEN IF r = 1 THEN: r = 2: GOTO moved IF r = 2 THEN: r = 3: GOTO moved IF r = 4 THEN: r = 5: GOTO moved IF r = 5 THEN: r = 6: GOTO moved IF r = 7 THEN: r = 8: GOTO moved IF r = 8 THEN: r = 9: GOTO moved END IF IF cmd$ = "GO SOUTH" OR cmd$ = "SOUTH" OR cmd$ = "S" THEN IF r = 1 THEN: r = 4: GOTO moved IF r = 4 THEN: r = 7: GOTO moved IF r = 2 THEN: r = 5: GOTO moved IF r = 5 THEN: r = 8: GOTO moved IF r = 3 THEN: r = 6: GOTO moved IF r = 6 THEN: r = 9: GOTO moved END IF IF cmd$ = "GO WEST" OR cmd$ = "WEST" OR cmd$ = "W" THEN IF r = 3 THEN: r = 2: GOTO moved IF r = 2 THEN: r = 1: GOTO moved IF r = 6 THEN: r = 5: GOTO moved IF r = 5 THEN: r = 4: GOTO moved IF r = 9 THEN: r = 8: GOTO moved IF r = 8 THEN: r = 7: GOTO moved END IF IF (cmd$ = "FIRE PISTOL") THEN CLS PRINT "Not smart to waste the only round you have on nothing..." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "EXAMINE WEREWOLF") AND r = 5 THEN CLS PRINT "The monsterous creature stand eight feet tall and is covered in a" PRINT "wave of fur. His/her pants are torn to shreds. It growls at you" PRINT "with a look of hungry in it's eye's." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "EXAMINE PISTOL") AND gotpistol = 1 THEN CLS PRINT "The detail put into those old service revolver, is quite wonderful." PRINT "It's a shame you only have one silver bullet." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "FIRE PISTOL") AND gotpistol = 1 AND r = 5 THEN CLS GOTO win: DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "REASON WITH IT") AND r = 5 THEN CLS GOTO lose: DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "EXAMINE STATUE") AND r = 5 THEN CLS PRINT "The state of the statue of Lord Howarth is quite sad. The copper" PRINT "as turned a sickly green mixed with bird dropping's makes it appear" PRINT "older than it is. A sign reads -In honor of England's greatest" PRINT "Lord, may he be in our thoughts and prayers 1845.-" DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF moved: RETURN r1: PRINT "The cold night air embraces you like a mothers hug. You can" PRINT "feel the eye's of the beast upon you." RETURN r2: PRINT "Large iron bars, that stand ten feet tall, and close you in from" PRINT "the modern world. The lights from the lanterns that are placed on" PRINT "the streets, give you a sense of hope." RETURN r3: PRINT "Not a person in sight, nor a cab could be heard, and you are" PRINT "surrounded by tree's and brush." RETURN r4: PRINT "The cobblestone path echos with every step you take. The scent of a" PRINT "dog that has gone for years without a bath, fills the air." RETURN r5: PRINT "You are standing before a statue of Lord Howarth. He stands so noble" PRINT "and yet ignores the world unfolding before him." RETURN r6: PRINT "While a light fog begin's to roll in. You can hear what could only" PRINT "be described as a dog growling in defense. Trying to ward off others." RETURN r7: PRINT "The moon is at it's highest peak and is strangely larger then you have" PRINT "ever seen before. Like it's calling out to something in the night." RETURN r8: PRINT "A rustling comes from the bushes beside you. Quickly you turn to find" PRINT "that it's nothing but the wind." RETURN r9: PRINT "A scream echoes out through the park. Nothing but a moment of sheer" PRINT "panic over comes you. The thought of this being the end makes you sick" PRINT "to your stomach." RETURN win: COLOR 2, 0 CLS PRINT "You quickly draw your pistol and aim for the beasts heart." PRINT "This causes the Werewolf to charge at you with the speed of" PRINT "a train. Without a moment to spare you fire at the beast with" PRINT "the the only thing that'll stop it. The bullet enters it's" PRINT "body and the creature that once was transformed back into" PRINT "The lovely Miss Ivory, heiress to the steel mill in town." PRINT "How could this have happened? There is more to this mystery" PRINT "then meets the eye." PRINT DO: LOOP UNTIL INKEY$ <> "" END lose: COLOR 2, 0 CLS PRINT "In some attempt to reason with the beast, it lunges at you" PRINT "and knocking you to the ground. Before it takes your life, it" PRINT "chuckles in your face and murders you upon the cobblestone" PRINT "pathway." PRINT DO: LOOP UNTIL INKEY$ <> "" END FUNCTION GrabInput$ x = POS(0) y = CSRLIN maxwidth = _WIDTH - x PCOPY 0, 1 'make a backup copy of the screen DO k = _KEYHIT i$ = INKEY$ LOOP UNTIL k = 0 AND INKEY$ = "" 'clear the keyboard buffer DO _LIMIT 30 PCOPY 1, 0 LOCATE y, x: PRINT Userinput$ k = _KEYHIT SELECT CASE k CASE 8 Userinput$ = LEFT$(Userinput$, LEN(Userinput$) - 1) CASE 65 TO 90, 97 TO 122, 32 Userinput$ = UCASE$(Userinput$ + CHR$(k)) END SELECT timerleft## = (DOOM - TIMER(0.001)) minutes = timerleft## \ 60 seconds = timerleft## - minutes * 60 LOCATE 2, 32: PRINT USING " ###:##.###"; minutes, seconds IF timerleft## <= 0 THEN GOTO doomed _DISPLAY LOOP UNTIL k = 13 GrabInput$ = Userinput$ _AUTODISPLAY EXIT FUNCTION doomed: CLS PRINT "The light of the morning sun erases the darkness from the landscape." PRINT "Before you know it the beast vanishes from sight and escapes from" PRINT "the park. You are left alone to wonder just who or what that creature" PRINT "is." _DISPLAY END END SUB